home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume90 / devices / msh_1_5 / part01 / src / dos.h < prev    next >
C/C++ Source or Header  |  1990-02-21  |  2KB  |  94 lines

  1.  
  2. /*
  3.  *  $Id: dos.h,v 1.2 90/01/27 20:29:53 Rhialto Exp $
  4.  */
  5.  
  6. #ifdef NOTDEF
  7. #include "exec/types.h"
  8. #include "exec/memory.h"
  9. #include "libraries/dos.h"
  10. #include "libraries/dosextens.h"
  11. #include "libraries/filehandler.h"
  12. #endif NOTDEF
  13.  
  14. /*
  15.  *  ACTIONS which do not exist in dosextens.h but which indeed exist on
  16.  *  the Amiga.
  17.  */
  18.  
  19. #define ACTION_MORECACHE    18L
  20. #define ACTION_FLUSH        27L
  21. #define ACTION_RAWMODE        994L
  22. #define ACTION_OPENRW        1004L
  23. #define ACTION_OPENOLD        1005L
  24. #define ACTION_OPENNEW        1006L
  25. #define ACTION_CLOSE        1007L
  26. #define ACTION_SEEK        1008L
  27.  
  28. #define FIBB_HIDDEN 7L
  29. #define FIBF_HIDDEN (1L<<FIBB_HIDDEN)
  30.  
  31. #define CTOB(x) (void *)(((long)(x))>>2)    /*  BCPL conversion */
  32. #define BTOC(x) (void *)(((long)(x))<<2)
  33.  
  34. #define bmov(ss,dd,nn) CopyMem(ss,dd,(ulong)(nn))   /* Matt's habit */
  35.  
  36. #define DOS_FALSE   0L
  37. #define DOS_TRUE    -1L
  38.  
  39. typedef struct Interrupt    INTERRUPT;
  40. typedef struct Task        TASK;
  41. typedef struct FileLock     LOCK;
  42. typedef struct FileInfoBlock    FIB;
  43. typedef struct DosPacket    PACKET;
  44. typedef struct Process        PROC;
  45. typedef struct DeviceNode    DEVNODE;
  46. typedef struct DeviceList    DEVLIST;
  47. typedef struct DosInfo        DOSINFO;
  48. typedef struct RootNode     ROOTNODE;
  49. typedef struct FileHandle    FH;
  50. typedef struct MsgPort        PORT;
  51. typedef struct Message        MSG;
  52. typedef struct MinList        LIST;
  53. typedef struct MinNode        NODE;
  54. typedef struct DateStamp    STAMP;
  55. typedef struct InfoData     INFODATA;
  56. typedef struct DosLibrary    DOSLIB;
  57.  
  58. #define PType (packet->dp_Type)
  59. #define PArg1 (packet->dp_Arg1)
  60. #define PArg2 (packet->dp_Arg2)
  61. #define PArg3 (packet->dp_Arg3)
  62. #define PArg4 (packet->dp_Arg4)
  63. #define PRes1 (packet->dp_Res1)
  64. #define PRes2 (packet->dp_Res2)
  65.  
  66. #define dl_MSFileLockList   dl_unused
  67.  
  68.  
  69. /*
  70.  *  (void *)  in C means 'pointer to anything'.  I use it
  71.  *  extensively.
  72.  */
  73.  
  74. extern void *AbsExecBase;
  75.  
  76. extern struct MsgPort *CreatePort();
  77. extern void *AllocMem(), *RemHead(), *GetMsg();
  78. extern void *FindTask(), *Open(), *OpenLibrary();
  79.  
  80. extern void   *dosalloc(), *NextNode(), *GetHead(), *GetTail();
  81. extern void   btos(), returnpacket();
  82.  
  83. extern char *typetostr();
  84.  
  85. extern struct DeviceList *NewVolNode();
  86. extern void FreeVolNode();
  87. extern struct FileLock *NewFileLock();
  88. extern long FreeFileLock();
  89. extern int DiskRemoved();
  90. extern void DiskInserted();
  91. extern DEVLIST *WhichDiskInserted();
  92. extern int CheckRead();
  93. extern int CheckWrite();
  94.